package org.zhadoop.stream.cql.semanticanalyzer.parser.visitor;

import org.zhadoop.stream.cql.semanticanalyzer.parser.CQLParser.ColumnNameTypeContext;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.ColumnNameTypeListContext;

/**
 * 列名称类型列表遍历
 * @author zwd
 *
 */
public class ColumnNameTypeListVisitor extends AbsCQLParserBaseVisitor<ColumnNameTypeListContext>{

	private ColumnNameTypeListContext context = null;
	
	public ColumnNameTypeListVisitor() {
		context = new ColumnNameTypeListContext();
	}
	
	@Override
	protected ColumnNameTypeListContext defaultResult() {
		return context;
	}
	
	@Override
	public ColumnNameTypeListContext visitColumnNameType(ColumnNameTypeContext ctx) {
		ColumnNameTypeVisitor visitor = new ColumnNameTypeVisitor();
		context.getColumns().add(visitor.visit(ctx));
		return super.visitColumnNameType(ctx);
	}

}
